#include <string>
#include "HashTable.h"
using namespace std;

#ifndef SCANER_H
#define	SCANER_H

class Scaner {
public:
    // Функционал
    Scaner(char* ifile, char* ofile);
    ~Scaner();
    string* getLexeme(int &token);
private:
    // Структура
    HashTable *valHt, *sepHt, *keyHt, *idHt;
    string *Buff;
    int strBegIdx;
    int strNumber;
    // Обслуживающие
    void makeSepHt();
    void makeKeyHt();
    bool nextString();
    // Автоматы
    bool valMac(char c,int &state);
    bool valFin(int &state);
    bool sepMac(char c, int &state);
    bool sepFin(int &state);
    bool keyMac(char c, int &state);
    bool keyFin(int &state);
    bool idMac(char c, int &state);
    bool idFin(int &state);
    bool unknownMac(char c);
};

#endif	/* SCANER_H */

